package com.education.business.task;

import com.education.common.model.ModelBeanMap;

/**
 * 封装任务参数类
 * @author 余一
 * @date 2021/9/14  14:58
 */
public class TaskParam extends ModelBeanMap {
    private Class<? extends TaskListener> taskListenerClass;
    private final long timestamp;

    public Class<? extends TaskListener> getTaskListenerClass() {
        return taskListenerClass;
    }

    public long getTimestamp() {
        return timestamp;
    }
    public TaskParam(Class<? extends TaskListener> taskListenerClass) {
        this(taskListenerClass,null);
    }

    public TaskParam(Class<? extends TaskListener> taskListenerClass, long timestamp) {
        this.taskListenerClass = taskListenerClass;
        this.timestamp = timestamp;
    }
    public TaskParam(Class<? extends TaskListener> taskListenerClass,Object object) {
        this(taskListenerClass,System.currentTimeMillis());
    }

}
